//导入
import React, { Component } from 'react';
import { Route, NavLink } from 'react-router-dom';
import PropTypes from 'prop-types';

import './Index.less'
import { NavConfiger, Navigator } from '../../navigator/Navigator';
import { Page1 } from './Page1';


class Index extends Component {

    navConfig = {
        left: "上一页",
        center: "外层导航",
        right: <NavLink to={"/nested/page1"} >下一页</NavLink>,
        navClass: "nav_area_default"
    };

    render() {

        return (
            <NavConfiger>
                <fieldset className="page1" >
                    <legend>嵌套导航</legend>
                    <Navigator navConfig={this.navConfig} />
                    <div className="content_box" >
                        <p>我是外层页面的内容</p>
                        <Route path={`${this.props.match.path}/page1`} component={Page1} />
                    </div>
                </fieldset>
            </NavConfiger>

        );
    }
}



export { Index };
